package MercuryTour;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class BookAFlight {
	
	@FindBy(name = "passFirst0")
	WebElement passengerFirstName;
	
	@FindBy(name = "passLast0")
	WebElement passengerLastName;
	
	@FindBy(name = "creditnumber")
	WebElement creditCardNumber;
	
	@FindBy(name = "buyFlights")
	WebElement clickPurchaseButton;
	
	public void assignBookInfo (String[] bookInfo)
	
	{
		passengerFirstName.sendKeys(bookInfo[0]);
		passengerLastName.sendKeys(bookInfo[1]);
		creditCardNumber.sendKeys(bookInfo[2]);
	}

	public void clickPurchaseButton ()
	
	{
		clickPurchaseButton.click();
	}
}
